//==================================================================
//  Copyright (C) 2006  Davide Pasca
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//==================================================================
///
///
///
///
//==================================================================

#ifndef CAPTURE_BASE_H
#define CAPTURE_BASE_H

#include "psys.h"

#define CAP_MAX_DEVICES				6
#define CAP_DRIVER_FLAG_VSRCDIALOG	1

//==================================================================
class CaptureBase
{
	int				_cur_dev;
public:
//	CaptureBase(){}
	virtual ~CaptureBase(){}

	virtual int		Setup( int dr_num, int w, int h, float fps, int flags ) = 0;
	virtual int		BeginCapture(void) = 0;
	virtual void	SuspendCapture( int yesno ) = 0;
	virtual int		IsSuspended() = 0;
	virtual int		CheckNextFrame() = 0;
	virtual void	EndCapture() = 0;

//	virtual void	driver_dialog_videosource(void) = 0;
	virtual int		GetDriverN(void) = 0;
	virtual TCHAR	*GetDriverName(int i) = 0;
	virtual TCHAR	*GetDriverVersion(int i) = 0;

	int				FindDriverByName( const TCHAR *namep );

	virtual int		rgb_buffer_get_width() = 0;
	virtual int		rgb_buffer_get_height() = 0;
	virtual PError	rgb_buffer_copy( u_char *dest_rgb_datap ) = 0;
	virtual PError	rgbraw_buffer_copy( u_char *dest_rgb_datap ) = 0;
};

#endif
